package losrebellos.papervision3d.view 
{
	import org.papervision3d.cameras.Camera3D;
	import org.papervision3d.lights.PointLight3D;
	import org.papervision3d.objects.DisplayObject3D;
	import org.papervision3d.render.BasicRenderEngine;
	import org.papervision3d.scenes.Scene3D;
	import org.papervision3d.view.Viewport3D;

	import flash.events.Event;

	/*
	 *
	 * @author los rebellos - ben@benoitvinay.com
	 *
	 */
	public class AbstractViewport3DPlus extends Viewport3D 
	{
		/*
		 *
		 * VARIABLES
		 *
		 */
		protected var _scene:Scene3D;
		protected var _camera:Camera3D;
		protected var _light:PointLight3D;
		protected var _renderer:BasicRenderEngine;
		protected var _children:Array = [];
		
		
		/*
		 *
		 * CONSTRUCTOR
		 *
		 */
		public function AbstractViewport3DPlus(viewportWidth:Number = 640, viewportHeight:Number = 480, autoScaleToStage:Boolean = false, interactive:Boolean = false, autoClipping:Boolean = true, autoCulling:Boolean = true)
		{
			super(viewportWidth, viewportHeight, autoScaleToStage, interactive, autoClipping, autoCulling);
			
			createScene();
			createCamera();
			createLight();
			createRenderer();
			
			createContent();
		}
		
		
		/*
		 * 
		 * CONTENT
		 * 
		 */
		protected function createScene():void
		{
			
		}
		protected function createCamera():void
		{
			
		}
		protected function createLight():void
		{
			
		}
		protected function createRenderer():void
		{
			
		}
		protected function createContent():void
		{
			
		}
		
		
		/*
		 * 
		 * CHILD 3D
		 * 
		 */
		public function getChild3DByName(name:String, recursive:Boolean = false):DisplayObject3D
		{
			name;
			recursive;
			
			return null;
		}
		public function addChild3D(child:DisplayObject3D, name:String = null):DisplayObject3D
		{
			child;
			name;
			
			return null;
		}
		public function removeChild3D(child:DisplayObject3D):DisplayObject3D
		{
			child;
			
			return null;
		}
		public function removeChild3DByName(name:String):DisplayObject3D
		{
			name;
			
			return null;
		}
		public function get numChildren3D():int
		{
			return 0;
		}

		
		/*
		 * 
		 * RENDERING
		 * 
		 */
		public function startRendering():void
		{
			
		}
		public function stopRendering():void
		{
			
		}
		protected function render(e:Event):void
		{
			
		}
		
		
		/*
		 * 
		 * UTILS
		 * 
		 */
		public function getPixelZ():Number
		{
			return 0;
		}
	}
}